package routers

import (
	"blog/controllers"
	"github.com/astaxie/beego"
)

func init() {
    beego.Router("/", &controllers.MainController{})
    beego.Router("/info",&controllers.MainController{},"get:Info")
    beego.Router("/about",&controllers.MainController{},"get:About")
    beego.Router("/skill",&controllers.MainController{},"get:List1")
    beego.Router("/life",&controllers.MainController{},"get:List2")
    beego.Router("/timer",&controllers.MainController{},"get:Timer")
    beego.Router("/blog",&controllers.MainController{},"get:Blog")
    beego.Router("/prise",&controllers.MainController{},"post:Prise")


    beego.Router("/admin",&controllers.AdminController{})
    /**
     * 轮播板块
     */
    beego.Router("/admin/banner",&controllers.AdminController{},"get:Banner")
	beego.Router("/admin/banner/add",&controllers.AdminController{},"get:BannerAdd")
    beego.Router("/admin/banner/api/list",&controllers.BannerController{},"get:List")
    beego.Router("/admin/banner/api/add",&controllers.BannerController{},"post:Add")
    beego.Router("/admin/banner/api/upload",&controllers.BannerController{},"post:Upload")
    beego.Router("/admin/banner/api/delete",&controllers.BannerController{},"post:Delete")
    /**
	 *菜单板块
     */
    beego.Router("/admin/menu",&controllers.AdminController{},"get:Menu")
	beego.Router("/admin/menu/add",&controllers.AdminController{},"get:MenuAdd")
    beego.Router("/admin/menu/api/list",&controllers.MenuController{},"get:List")
    beego.Router("/admin/menu/api/add",&controllers.MenuController{},"post:Add")
    beego.Router("/admin/menu/api/delete",&controllers.MenuController{},"post:Delete")
    /**
	 *文章板块
     */
    beego.Router("/admin/article",&controllers.AdminController{},"get:Article")
    beego.Router("/admin/article/add",&controllers.AdminController{},"get:ArticleAdd")
    beego.Router("/admin/article/api/list",&controllers.ArticleController{},"get:List")
    beego.Router("/admin/article/api/upload",&controllers.ArticleController{},"post:Upload")
    beego.Router("/admin/article/api/add",&controllers.ArticleController{},"post:Add")

}
